package com.jintu.portal.pojo.dto;

import com.alibaba.fastjson.annotation.JSONField;
import com.jintu.portal.pojo.entity.TSysMsg;
import com.jintu.portal.utils.BeanUtils;

import java.io.Serializable;
import java.util.Date;

/**
 * Created by liyou on 2017/9/29.
 */
public class SysMsgDto implements Serializable {

    private Long msgId;
    /**
     * 业务类型
     */
    private Integer serviceType;

    /**
     * 业务类型说明
     */
    private String serviceTypeText;

    /**
     * 创建时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm")
    private Date createTime;

    /**
     * 消息类型
     */
    private Integer type;

    /**
     * 消息类型说明
     */
    private String typeText;

    /**
     * 关联id
     */
    private String relId;

    private String money;

    /**
     * 消息内容
     */
    private String content;
    //业务扩展参数(json)
    private String extendParams;

    public SysMsgDto(TSysMsg tsm) throws Exception {
        BeanUtils.copyProperties(tsm, this);
        this.msgId = tsm.getId();
    }

    public Long getMsgId() {
        return msgId;
    }

    public void setMsgId(Long msgId) {
        this.msgId = msgId;
    }

    public Integer getServiceType() {
        return serviceType;
    }

    public void setServiceType(Integer serviceType) {
        this.serviceType = serviceType;
    }

    public String getServiceTypeText() {
        return serviceTypeText;
    }

    public void setServiceTypeText(String serviceTypeText) {
        this.serviceTypeText = serviceTypeText;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getTypeText() {
        return typeText;
    }

    public void setTypeText(String typeText) {
        this.typeText = typeText;
    }

    public String getRelId() {
        return relId;
    }

    public void setRelId(String relId) {
        this.relId = relId;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getExtendParams() {
        return extendParams;
    }

    public void setExtendParams(String extendParams) {
        this.extendParams = extendParams;
    }
}
